<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <script>
    let obj = {
      name: "Elisy",
      age: 22,
      0: "variable",
      [Symbol("s1")]: 200,
      [Symbol("s2")]: function () { },
    }

    //获取当前的所有非Symbol的私有属性
    console.log(Object.keys(obj))
    //获取当前的所有非Symbol的私有属性
    console.log(Object.getOwnPropertyNames(obj))
    //获取当前的所有非Symbol的私有属性的值
    console.log(Object.values(obj))
    //获取当前的所有非Symbol的私有属性和值合成一个可枚举的数组[[key],[value]]
    console.log(Object.entries(obj))
    //获取当前的所有Symbol的私有属性的值
    console.log(Object.getOwnPropertySymbols(obj))
  </script>
</body>

</html>